package com.woniuxy.microsystemsarserver.mapper;

import com.woniuxy.microsystemsarserver.bean.InvoiceBean;
import com.woniuxy.microsystemsarserver.bean.PageRequestBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 发票记录持久层
 * @author 杨灿
 */
@Mapper
@Repository
public interface InvoiceMapper {
    /**
     * 根据条件分页查询发票记录信息
     * @param InvoiceBean
     * @param pageRequestBean
     * @return
     */
    List<InvoiceBean> findByPage(@Param("i") InvoiceBean InvoiceBean, @Param("p") PageRequestBean pageRequestBean,@Param("userId") Long userId);

    /**
     * 查询所有发票记录信息
     * @return
     */
    List<InvoiceBean> findAll(@Param("userId") Long userId);

    /**
     * 根据id查询发票记录信息
     * @param invoiceId
     * @return
     */
    InvoiceBean findById(@Param("invoiceId") Long invoiceId);

    /**
     * 修改发票记录信息
     * @param invoiceBean
     * @return
     */
    int updateInvoice(@Param("i") InvoiceBean invoiceBean);
    /**
     * 新增门店信息
     * @param invoiceBean
     * @return
     */
    int saveInvoice(@Param("i") InvoiceBean invoiceBean);
}
